﻿@model shradhabookstores.Product

@{
    ViewBag.Title = "Edit";
}

<h2>Edit</h2>

@using (Html.BeginForm())
{
    @Html.AntiForgeryToken()
    
    <div class="form-horizontal">
        <h4>Product</h4>
        <hr />
        @Html.ValidationSummary(true)
        @Html.HiddenFor(model => model.ID)

        <div class="form-group">
            @Html.LabelFor(model => model.Name, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Name)
                @Html.ValidationMessageFor(model => model.Name)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Author, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Author)
                @Html.ValidationMessageFor(model => model.Author)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.SupplierID, "SupplierID", new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.DropDownList("SupplierID", String.Empty)
                @Html.ValidationMessageFor(model => model.SupplierID)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.IssuingDate, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.IssuingDate)
                @Html.ValidationMessageFor(model => model.IssuingDate)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Vesion, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Vesion)
                @Html.ValidationMessageFor(model => model.Vesion)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Price, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Price)
                @Html.ValidationMessageFor(model => model.Price)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Quantity, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Quantity)
                @Html.ValidationMessageFor(model => model.Quantity)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.PathImage, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.PathImage)
                @Html.ValidationMessageFor(model => model.PathImage)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.GenreProduct, "GenreProduct", new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.DropDownList("GenreProduct", String.Empty)
                @Html.ValidationMessageFor(model => model.GenreProduct)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.GenreID, "GenreID", new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.DropDownList("GenreID", String.Empty)
                @Html.ValidationMessageFor(model => model.GenreID)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Note, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Note)
                @Html.ValidationMessageFor(model => model.Note)
            </div>
        </div>

        <div class="form-group">
            <div class="col-md-offset-2 col-md-10">
                <input type="submit" value="Save" class="btn btn-default" />
            </div>
        </div>
    </div>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>
